﻿
using System;
using InDbContext;

namespace In.Api.Helpers
{
    public static class HospWsLogHelper
    {
        public static void Log(string type, string request, string response)
        {
            //写日志
            using (var ctx = new HospDatabaseEntity())
            {
                var log = new Log
                {
                    Action = type,
                    Request = request,
                    Response = response,
                    CreateDT = DateTime.Now
                };
                ctx.Logs.Add(log);
                ctx.SaveChanges();
            }
        }
    }
}